<header id="topbar" class="affix">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a href="<%= window.location.href %>">下分通道详情</a>
            </li>
            <li class="crumb-link">
                <a href="#op/withdraw_channel/">通道管理</a>
            </li>
            <li class="crumb-trail">通道编辑</li>
        </ol>
    </div>
    <div class="pull-right">
        <a href="javascript:;" class="btn btn-primary btn-sm light fw600 ml10 template-save"><span class="fa fa-save"></span>保存</a>
    </div>
</header>
<section id="content">
    <div class="panel">
        <div class="panel-heading">
            <span class="panel-icon"><i class="fa fa-gear text-primary"></i>
            </span>
            <span class="panel-title">参数设置</span>
        </div>
        <div class="panel-body">
            <form id="template-form" class="form-horizontal">
                <div class="form-group">
                    <label for="inputName" class="col-md-2 control-label">通道名称：</label>
                    <div class="col-md-8">
                        <input type="text" id="inputName" class="form-control" value="<%= info.name %>" placeholder="请输入通道名称..." required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputMchId" class="col-md-2 control-label">商户编号：</label>
                    <div class="col-md-8">
                        <select class="required form-control search-select" id="inputMchId">
                            <% _.each(mchs, function(mch){ %>
                                <option value="<%= mch.id %>" <%= info.mch_id == mch.id ? 'selected' : '' %>><%= mch.name %>(<%= mch.id %>)</option>
                            <% }) %>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputAppId" class="col-md-2 control-label">App ID：</label>
                    <div class="col-md-8">
                        <input type="text" id="inputAppId" class="form-control" value="<%= info.app_id %>" placeholder="支付宝app id" required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPayerName" class="col-md-2 control-label">付款姓名：</label>
                    <div class="col-md-8">
                        <input type="text" id="inputPayerName" class="form-control" value="<%= info.payer_name %>" placeholder="下分支付宝帐号真实姓名" required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPrivateKey" class="col-md-2 control-label">应用私钥：</label>
                    <div class="col-md-8">
                    <textarea id="inputPrivateKey" class="form-control" value="<%= info.private_key %>" placeholder="支付宝应用私钥" required>
                    <%= info.private_key %>
                    </textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPublicKey" class="col-md-2 control-label">支付宝公钥：</label>
                    <div class="col-md-8">
                    <textarea id="inputPublicKey" class="form-control" value="<%= info.public_key %>" placeholder="支付宝公钥" required>
                    <%= info.public_key %>
                    </textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputStatus" class="col-md-2 control-label">通道状态：</label>
                    <div class="col-md-8">
                        <select class="required form-control search-select" id="inputStatus">
                            <% _.each(CHANNEL_STATUS, function(v, k){ %>
                                <option value="<%= k %>" <%= info.status == k ? 'selected' : '' %>><%= v %></option>
                            <% }) %>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputWeight" class="col-md-2 control-label">权重：</label>
                    <div class="col-md-8">
                        <input id="inputWeight" type="number" min="0" max="1000" class="form-control" value="<%= info.weight %>" required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputBalance" class="col-md-2 control-label">余额(元)：</label>
                    <div class="col-md-8">
                        <input id="inputBalance" type="number" min="0" class="form-control" value="<%= info.balance %>" required>
                    </div>
                </div>
            </form>
        </div>
    </div>

</section>
